import java.util.Scanner;

public class SeqSearch {
    public static void main(String[] args) {
        String[] names = {"白眉鹰王", "金毛狮王", "紫衫龙王", "青翼蝠王"};
        Scanner scanner = new Scanner(System.in);
        System.out.println("请输入你要查询的数据：");
        String result = scanner.next();
        int index = -1;
        for (int i = 0; i < names.length; i++) {
            if (result.equals(names[i])) {
                index = i;
                System.out.println("数组中有这个数据，下标为：" + index);
            }
        }
        if (index == -1) {
            System.out.println("数组中没有这个数据！");
        }
    }
}
